/** 文件模块 */
const router = require('koa-router')()

const { upload, preview, remove, list } = require('../controllers/file')

router.prefix('/api/file')

router.post('/upload', upload);                     // 上传
router.delete('/remove/:fileId', remove);           // 删除
router.get('/preview/:fileId', preview);            // 预览
router.get('/list', list);                          // 列表

module.exports = router

